<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>仪表盘 - Titanic 数据分析</title>
    <style>
        body { font-family: Arial, sans-serif; background: #f5f6fa; }
        .container { width: 900px; margin: 40px auto; background: #fff; border-radius: 8px; box-shadow: 0 2px 8px #ccc; padding: 32px; }
        h2 { text-align: center; margin-bottom: 24px; }
        .logout { float: right; margin-top: -40px; }
        .analysis { margin-bottom: 32px; }
        .chart { margin: 0 auto; }
    </style>
</head>
<body>
    <div class="container">
        <a href="{{ url_for('logout') }}" class="logout">登出</a>
        <h2>Titanic 数据分析仪表盘</h2>
        <div class="analysis">
            <h3>分析结果摘要</h3>
            <pre>{{ analysis|tojson(indent=2, ensure_ascii=False) }}</pre>
        </div>
        <div class="chart">
            <h3>生存率按性别分布</h3>
            {{ chart_html|safe }}
        </div>
    </div>
</body>
</html> 